package com.itheima.controller;

import com.itheima.result.PageResult;
import com.itheima.result.Result;
import com.itheima.service.LogService;
import com.itheima.service.ReportService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/log")
@RequiredArgsConstructor
public class LogController {
    private final LogService logService;

    @GetMapping("/page")
    public Result PageQuery(Integer page, Integer pageSize){
        log.info("分页查询日志信息");
        PageResult pageResult = logService.PageQuery(page, pageSize);
        return Result.success(pageResult);
    }
}
